package cn.gzsf.coolshark.mapper;

import cn.gzsf.coolshark.entity.Banner;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface BannerMapper {

    @Select("select * from banner")
    List<Banner> select();
    @Delete("delete from banner where id=#{id}")
    int delete(int id);
    @Insert("insert into banner (url) values (#{url})")
    void insert(String url);
    @Select("select * from banner where id=#{id}")
    Banner selectById(int id);
    @Select("select url from banner where id=#{id}")
    String selectUrlById(Integer id);
    @Update("update banner set url=#{url} where id=#{id}")
    void update(Banner banner);
}
